package MineGod;

import java.io.IOException;

import org.lwjgl.opengl.GL11;
import org.newdawn.slick.opengl.Texture;
import org.newdawn.slick.opengl.TextureLoader;
import org.newdawn.slick.util.ResourceLoader;

public class GUIStartMenu extends GUI{

	static Texture tex;
	
	public GUIStartMenu(){
		buttons.add(new GUIButtonStart());
		buttons.add(new GUIButtonGoToHighScores());
		zIndex = 15;
	}
	
	
	public void updateButtons(MineGod game) {
		
	}


	public static void loadTexture(){
		try {
			tex = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/titleScreen.png"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	
	@Override
	public void updateLabels(MineGod game) {
		// TODO Auto-generated method stub
		
	}

	
	public void render(){
		for(GUIButton b: buttons){
			b.render(zIndex);
		}
		for(GUILabel l: labels){
			l.render(zIndex);
		}
		tex.bind();
		GL11.glBegin(GL11.GL_QUADS);
			GL11.glNormal3d(0, 0, 1);
			GL11.glTexCoord2d(0.0, 0.0);
			GL11.glVertex3d(0, 0, zIndex);
			GL11.glTexCoord2d(1.0, 0.0);
			GL11.glVertex3d(MineGod.windowWidth, 0, zIndex);
			GL11.glTexCoord2d(1.0, 1.0);
			GL11.glVertex3d(MineGod.windowWidth, MineGod.windowHeight, zIndex);
			GL11.glTexCoord2d(0.0, 1.0);
			GL11.glVertex3d(0, MineGod.windowHeight, zIndex);
		GL11.glEnd();
		
		
	}
	
	
	
}
